#include "keyboard.h"
//#include "uart.h"
#include "Menu.h"

 extern volatile signed char button_number;
 extern volatile unsigned char button_pressed;

 void keyboard (void)
{
 if (button_pressed)
 {
	 switch (button_number)
	 {
		case 0:
				{
				//PutStringUART0("button0>");
				SET_MENU(SIBLING);
				button_pressed = 0;
				show_menu_on_LCD();
				break;
				}
		case 1:
				{
				//PutStringUART0("button1>");
				SET_MENU(PREVIOUS);
				button_pressed = 0;
				show_menu_on_LCD();
				break;
				}
		case 2:
				{
				//PutStringUART0("button2>");
				GO_MENU_FUNC(SELECTFUNC);
				button_pressed = 0;
				
				break;
				}
		case 3:
				{
				//PutStringUART0("button3>");
				SET_MENU(NEXT);
				button_pressed = 0;
				show_menu_on_LCD();
				break;
				}
		case 4:
				{
				//PutStringUART0("button4>");
				SET_MENU(PARENT);
				button_pressed = 0;
				show_menu_on_LCD();
				break;
				}
		default :
				{				
				}
	 } 
 
 }
}
